-
Notifications
You must be signed in to change notification settings - Fork 14k
Fix vec iter zst alignment 148682 #149272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Handle zero-sized types (ZST) to prevent unalignment issues when dropping elements.
Test that Intolter::nth_back does not cause UB for ZSTs with high alignment.
|
This PR modifies |
|
r? @fee1-dead rustbot has assigned @fee1-dead. Use |
This comment has been minimized.
This comment has been minimized.
Fix incorrect usage of step_size in pointer creation for ZST.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the file name needs to be changed.
https://rustc-dev-guide.rust-lang.org/tests/best-practices.html#test-naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using the issues directory, please refer to this and choose a more appropriate location.
tests/ui/issues/issue-148682.rs
Outdated
| @@ -0,0 +1,9 @@ | |||
| // check-pass | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // check-pass | |
| //@ check-pass |
This comment has been minimized.
This comment has been minimized.
|
r? libs |
|
@reddevilmidzy Thanks! Updated as requested. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and please squash
| // @ check-pass | ||
| //test Intolter::nth_back does not cause UB for ZSTs with high alignment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove leading spaces from commands, and add a space before comments.
| // @ check-pass | |
| //test Intolter::nth_back does not cause UB for ZSTs with high alignment | |
| //@ check-pass | |
| // test Intolter::nth_back does not cause UB for ZSTs with high alignment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!It seems that all the CI tests are passed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using the issues directory, please refer to this and choose a more appropriate location.
Update test to check for run-pass instead of check-pass.
Add test for Intolter::nth_back with ZSTs
Co-authored-by: Yukang <moorekang@gmail.com>
No description provided.